3.973 \(\int \frac{(1-x)^n (1+x)^{-n}}{x^4} \, dx\)

Optimal. Leaf size=105 \[ -\frac{2 \left (2 n^2+1\right ) (1-x)^{n+1} (x+1)^{-n-1} \, _2F_1\left (2,n+1;n+2;\frac{1-x}{x+1}\right )}{3 (n+1)}-\frac{(1-x)^{n+1} (x+1)^{1-n}}{3 x^3}+\frac{n (1-x)^{n+1} (x+1)^{1-n}}{3 x^2} \]

[Out]

-((1 - x)^(1 + n)*(1 + x)^(1 - n))/(3*x^3) + (n*(1 - x)^(1 + n)*(1 + x)^(1 - n))
/(3*x^2) - (2*(1 + 2*n^2)*(1 - x)^(1 + n)*(1 + x)^(-1 - n)*Hypergeometric2F1[2,
1 + n, 2 + n, (1 - x)/(1 + x)])/(3*(1 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.124585, antiderivative size = 105, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222 \[ -\frac{2 \left (2 n^2+1\right ) (1-x)^{n+1} (x+1)^{-n-1} \, _2F_1\left (2,n+1;n+2;\frac{1-x}{x+1}\right )}{3 (n+1)}-\frac{(1-x)^{n+1} (x+1)^{1-n}}{3 x^3}+\frac{n (1-x)^{n+1} (x+1)^{1-n}}{3 x^2} \]

Antiderivative was successfully verified.

[In]  Int[(1 - x)^n/(x^4*(1 + x)^n),x]

[Out]

-((1 - x)^(1 + n)*(1 + x)^(1 - n))/(3*x^3) + (n*(1 - x)^(1 + n)*(1 + x)^(1 - n))
/(3*x^2) - (2*(1 + 2*n^2)*(1 - x)^(1 + n)*(1 + x)^(-1 - n)*Hypergeometric2F1[2,
1 + n, 2 + n, (1 - x)/(1 + x)])/(3*(1 + n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 13.9519, size = 80, normalized size = 0.76 \[ \frac{n \left (- x + 1\right )^{n + 1} \left (x + 1\right )^{- n + 1}}{3 x^{2}} - \frac{2 \left (2 n^{2} + 1\right ) \left (- x + 1\right )^{n + 1} \left (x + 1\right )^{- n - 1}{{}_{2}F_{1}\left (\begin{matrix} n + 1, 2 \\ n + 2 \end{matrix}\middle |{\frac{x - 1}{- x - 1}} \right )}}{3 \left (n + 1\right )} - \frac{\left (- x + 1\right )^{n + 1} \left (x + 1\right )^{- n + 1}}{3 x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((1-x)**n/x**4/((1+x)**n),x)

[Out]

n*(-x + 1)**(n + 1)*(x + 1)**(-n + 1)/(3*x**2) - 2*(2*n**2 + 1)*(-x + 1)**(n + 1
)*(x + 1)**(-n - 1)*hyper((n + 1, 2), (n + 2,), (x - 1)/(-x - 1))/(3*(n + 1)) -
(-x + 1)**(n + 1)*(x + 1)**(-n + 1)/(3*x**3)

_______________________________________________________________________________________

Mathematica [C]  time = 0.239668, size = 95, normalized size = 0.9 \[ -\frac{4 (1-x)^n (x+1)^{-n} F_1\left (3;-n,n;4;\frac{1}{x},-\frac{1}{x}\right )}{3 x^2 \left (4 x F_1\left (3;-n,n;4;\frac{1}{x},-\frac{1}{x}\right )-n \left (F_1\left (4;1-n,n;5;\frac{1}{x},-\frac{1}{x}\right )+F_1\left (4;-n,n+1;5;\frac{1}{x},-\frac{1}{x}\right )\right )\right )} \]

Warning: Unable to verify antiderivative.

[In]  Integrate[(1 - x)^n/(x^4*(1 + x)^n),x]

[Out]

(-4*(1 - x)^n*AppellF1[3, -n, n, 4, x^(-1), -x^(-1)])/(3*x^2*(1 + x)^n*(4*x*Appe
llF1[3, -n, n, 4, x^(-1), -x^(-1)] - n*(AppellF1[4, 1 - n, n, 5, x^(-1), -x^(-1)
] + AppellF1[4, -n, 1 + n, 5, x^(-1), -x^(-1)])))

_______________________________________________________________________________________

Maple [F]  time = 0.105, size = 0, normalized size = 0. \[ \int{\frac{ \left ( 1-x \right ) ^{n}}{{x}^{4} \left ( 1+x \right ) ^{n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((1-x)^n/x^4/((1+x)^n),x)

[Out]

int((1-x)^n/x^4/((1+x)^n),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (x + 1\right )}^{-n}{\left (-x + 1\right )}^{n}}{x^{4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((-x + 1)^n/((x + 1)^n*x^4),x, algorithm="maxima")

[Out]

integrate((x + 1)^(-n)*(-x + 1)^n/x^4, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (-x + 1\right )}^{n}}{{\left (x + 1\right )}^{n} x^{4}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((-x + 1)^n/((x + 1)^n*x^4),x, algorithm="fricas")

[Out]

integral((-x + 1)^n/((x + 1)^n*x^4), x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((1-x)**n/x**4/((1+x)**n),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (-x + 1\right )}^{n}}{{\left (x + 1\right )}^{n} x^{4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((-x + 1)^n/((x + 1)^n*x^4),x, algorithm="giac")

[Out]

integrate((-x + 1)^n/((x + 1)^n*x^4), x)